home *** CD-ROM | disk | FTP | other *** search
Text File | 1992-09-02 | 34.5 KB | 1,449 lines |
-
- SECTION BenReplay,CODE
-
- movem.l d1-a6,-(sp)
-
- move.l (execbase).w,a6
- jsr forbid(a6)
-
- move.w $dff01c,d0
- or.w #$8000,d0
- move.w d0,OldIntena
- move.w #$7fff,$dff09a
- move.w #$e020,$dff09a
-
- bsr.w Br_GetVBR
-
- lea Mod,a0
- bsr.w Br_Init
- beq.b End
- bsr.w Br_Start
-
- move.w #1,Br_FadeVolume ; Fade in
-
- Click: btst #6,$bfe001
- bne.b Click
-
- move.w #-1,Br_FadeVolume ; Fade end
- .Wait:
- tst.w Br_MasterVolume
- bne.b .Wait
-
- bsr.w Br_End
-
- End:
- move.w OldIntena(pc),$dff09a
-
- move.l (execbase).w,a6
- jsr permit(a6)
-
- movem.l (sp)+,d1-a6
- rts
-
- OldIntena: dc.w 0
-
- forbid = -30-102
- permit = -30-108
- execbase = 4
-
- *********************************************************
- * * BEN REPLAY V1.0 beta * *
- * Release date : *
- * 25.11.94, 20:35 pm... *
- * Coded by BEN from Melting Pot *
- *********************************************************
-
- *********************************************************
- * *
- * This replay supports : *
- * *
- * - Finetuned samples *
- * - Master volume control with fade *
- * - CIA Timing *
- * - VBR anywhere and PC independant... *
- * 0 - Arpeggio *
- * 12 - Slide Tune Up/Down *
- * 3 - Tone Portamento *
- * 4 - Vibrato (a bit crashed...) *
- * 5 - Portamento + Volume Slide *
- * 6 - Vibrato + Volume Slide *
- * 9 - Sample Offset *
- * A - Volume Slide *
- * B - Pattern Break *
- * C - Set Volume *
- * D - Jump Position *
- * F - Set Speed *
- * E0 - Set Filter *
- * E12- Fine Slide Tune Up/Down *
- * E6 - Loop Pattern *
- * E9 - Retrig Note *
- * EAB- Fine Volume Up/Down *
- * EC - Note Cut *
- * ED - Note Delay *
- * EE - Pattern Delay *
- * *
- * All other effects will NEVER be implemented *
- * because nobody uses them, and I don't want *
- * to have more and more headaches... *
- * *
- * It takes about 4 scans maximum on A1200... *
- * and much better if you've got some real FAST... *
- * *
- * This replay is a freeware, but if you like *
- * it and you use it, or if you find bugs, just *
- * write a nice letter (anything that looks like *
- * paper) and you'll certainly get an answer. *
- * In fact, this is a sort of PostCardware... *
- * Anyway, you will be registered, by the will *
- * of God... *
- * You also may send money... (joke, coz *
- * I really hate those democoders who sell their *
- * routines and other stuffs... Just lamers...) *
- * At least, I think there are still many bugs, *
- * so SEND me bugs report PLEEEEEAAAASE !!! *
- * *
- * Write to: *
- * Benjamin LEGROS *
- * 106 rue Alexandre DETROY *
- * 59650 VILLENEUVE D'ASCQ *
- * FRANCE *
- * *
- * La direction décline tout responsabilité dans le cas *
- * de dommages causés par la présente routine, due à une *
- * utilisation abusive de drogues et autres *
- * hallucinogènes. Nous vous prions de bien vouloir *
- * tirer la chasse d'eau en partant, et nous vous *
- * souhaitons un agréable voyage... *
- * *
- * To be continued... *
- * *
- *********************************************************
-
- *********************************************************
- * *
- * How to use it ?? *
- * First, just BSR Br_Init after putting the *
- * 31 SAMPLES PROTRACKER module address in *
- * a0 (lea mod,a0)... *
- * Then, when you want the module to start, *
- * just BSR Br_Start. As it use CIA timing, *
- * you don't have to execute the replay each *
- * vblank... But you MUSTN'T USE TIMERS A *
- * of the CIA-B, coz I use timer A... (anyway, don't *
- * use CIA...) *
- * By the way, you have to set Level6 and master *
- * interruptionbits in Intena ($9A). *
- * To stop the replay, just BSR Br_End. *
- * *
- * You can momently stop the replay by setting *
- * Br_PlayEna to 0. Restart the replay using *
- * BSR Br_Start... *
- * *
- * The volume control option is enabled by *
- * setting the Br_MasterVolumeControl option *
- * to 1 And then, move Br_MasterVolume from 0 to 64 *
- * *
- * Br_Voice should be used if your module use *
- * 1, 2 or 3 channels (like games using SFX...) *
- * For speedup reasons, you MUST use lower channels *
- * (channels 1&2 for 2 channels module), and you *
- * MUSTN'T use any effect on non-played channel(s) *
- * *
- * To make this routine play-able on A4000 where *
- * VBR may be anywhere in (FAST)ram, just check *
- * it and put it in Br_VBR, or simply call *
- * BSR_GetVBR... *
- * *
- * The Converted Module player is also available *
- * Write me !! *
- * *
- *********************************************************
-
- Br_MasterVolumeControl = 1
- Br_Volume = 0
- Br_Voice = 4
- Br_TempoInit = 125
- Br_FrameValue = 14290*125 ; Frame time in CIA ticks*125
- Br_ReplayTime = $180*2+180 ; about A1200 value...
-
- *****************************************************************************
- Br_Start:********************************************************************
- movem.l a2/a3,-(sp)
- lea Br_Play(pc),a3
- move.l Br_VBR(pc),a2
- move.w #$400,$dff096
- move.l a3,$78(a2)
- move.w #$e020,$dff09a
-
- lea $bfd000,a3
-
- move.b #$7e,$d00(a3) ; disable all timings & alarms
- move.b #$08,$e00(a3) ; one-shot mode
- move.b #(Br_FrameValue/Br_TempoInit-Br_ReplayTime)>>8,$500(a3) ; high
- move.b #(Br_FrameValue/Br_TempoInit-Br_ReplayTime)&$ff,$400(a3); Low
-
- .Wait: btst #0,$d00(a3) ; Repeat until no alarm A
- beq.b .Wait
- move.b #$81,$d00(a3) ; init Timer A
- move.w #$2000,$dff09c
-
- .Wbl1: cmp.b #$ff,$dff006 ; Wait good sync
- bne.b .Wbl1 ; for modules using VBLANK timer...
- .Wbl2: cmp.b #$0,$dff006 ; (tempo=125)
- bne.b .Wbl2
- .Wbl3: cmp.b #$0,$dff006
- beq.b .Wbl3
- .Wbl4: cmp.b #$0,$dff006
- bne.b .Wbl4
- move.b #$19,$e00(a3) ; Start CIA
- movem.l (sp)+,a2/a3
- rts
-
- *****************************************************************************
- Br_Play:*********************************************************************
- movem.l d0-a6,-(sp)
- tst.b $bfdd00
- lea Br_Infos(pc),a0
- tst.w (a0)
- beq.w Br_DontPlay
- move.l #$80000000,Br_DMACON-Br_Infos(a0)
- move.l Br_Pattern(pc),a1
- lea Br_ChannelInfo(pc),a2
- lea Br_SampleInfos(pc),a3
- lea Br_EffectNo(pc),a6
- lea $dff0a0,a5
- move.w #$400,$096-$0a0(a5) ; Force blitter priority
- moveq #1,d6 ; DMA
- moveq #Br_Voice-1,d7
-
- tst.w Br_Counter-Br_Infos(a0)
- bne.w Br_PlayOldNote
-
- Br_PlayNewNote:
- moveq #0,d5 ; Sample Check
-
- move.b (a1),d0 ; D0 = Sample
- move.w (a1)+,d1 ; D1 = Note
- beq.b .Br_PlayNewCheckEffect
-
- ext.w d0 *** Check SampleDatas ***
- beq.b .Br_PlayNewDontChangeVolume
- subq.w #1,d0
- lsl.w #5,d0
- move.w d0,Br_ChOldSample(a2)
- move.l a3,d2
- lea Br_ChVol+1(a2),a4
- lea Br_SplVol(a3,d0.w),a3
- move.b (a3)+,(a4)+ ; Volume
- move.l (a3)+,(a4)+ ; Address
- move.l (a3)+,(a4)+ ; RepeatPoint
- move.l (a3)+,(a4)+ ; Length & Loop
- move.l d2,a3
-
- .Br_PlayNewDontChangeVolume: *** Check period & address ***
- and.w #$ff,d1
- beq.b .Br_PlayNewCheckEffect
-
- move.w Br_ChOldSample(a2),d0
- clr.w Br_ChPortDest(a2)
- subq.w #2,d1
- move.w d1,Br_ChNote(a2)
- move.l Br_SplFineTablePtr(a3,d0.w),a4
- move.w (a2),Br_ChPortSource(a2) ; Br_ChPer
- move.w (a4,d1.w),(a2) ; Br_ChPer
-
- tst.w Br_PtrnDelay-Br_Infos(a0) ; Si pattern delay, pas jouer
- bne.b .Br_PlayNewCheckEffect ; nouveau sample, mais garde
- ; la periode et autres...
-
- moveq #-1,d5 ; Test ok
-
- .Br_PlayNewCheckEffect: *** Check effect ***
- move.b (a1),d0 ; D0 = Effect
- ext.w d0
- move.w (a1)+,d1 ; D1 = Command
- move.w d1,Br_ChEff(a2)
- beq.b .Br_PlayNewCheckNoEffect
- move.w .Br_EffectTable1(pc,d0.w),d0
- jsr (a6,d0.w) ; A6 = Br_EffectNo
- bra.b .Br_PlayNewCheckNoEffect
-
- .Br_EffectTable1: ; Effets à la 1ère frame
- dc.w Br_PrepArpeggio-Br_EffectNo ; 0-Arpeggio
- dc.w Br_EffectNo-Br_EffectNo ; 1-Tune Up
- dc.w Br_EffectNo-Br_EffectNo ; 2-Tune Down
- dc.w Br_PrepPortamento-Br_EffectNo ; 3-Portamento
- dc.w Br_PrepVibrato-Br_EffectNo ; 4-Vibrato
- dc.w Br_PrepPortVolSlide-Br_EffectNo ; 5-Portamento + Volume Slide
- dc.w Br_PrepVibrVolSlide-Br_EffectNo ; 6-Vibrato + Volume Slide
- dc.w Br_EffectDisconnect-Br_EffectNo ; 7 Tremolo
- dc.w Br_EffectDisconnect-Br_EffectNo ; 8
- dc.w Br_SampleOffset-Br_EffectNo ; 9-Sample Offset
- dc.w Br_EffectNo-Br_EffectNo ; A-Volume Slide
- dc.w Br_BreakSong-Br_EffectNo ; B-Break Song
- dc.w Br_SetVolume-Br_EffectNo ; C-Set Volume
- dc.w Br_BreakPattern-Br_EffectNo ; D-Break Pattern
- dc.w Br_ECommands1-Br_EffectNo ; E Others
- dc.w Br_SetSpeed-Br_EffectNo ; F-Set Speed
-
- .Br_PlayNewCheckNoEffect:
- tst.w d5 ; Check ok?
- beq.b .Br_PlayDontResetRegisters
- bpl.b .Br_PlayNoPer ; Delay
- move.w d6,$dff096 ; DMACON
- or.w d6,Br_DMACON-Br_Infos(a0)
- move.l Br_ChAdr(a2),(a5)
- move.w Br_ChLen(a2),4(a5)
- ; bra.b .Br_PlayPer ; <-----.
- .Br_PlayDontResetRegisters: ; |
- ; move.b Br_ChEff(a2),d0 ; <- Pas utile...
- ; or.b #%100,d0 ; <-----|
- ; cmp.b #12,d0 ; <-----|
- ; beq.b .Br_PlayNoPer ; <-----'
- .Br_PlayPer:
- move.w (a2),6(a5) ; Br_ChPer
- .Br_PlayNoPer:
- IFNE Br_MasterVolumeControl
- move.w Br_ChVol(a2),d0
- mulu.w Br_MasterVolume-Br_Infos(a0),d0
- lsr.w #6,d0
- move.w d0,8(a5)
- ELSE
- move.w Br_ChVol(a2),8(a5)
- ENDC
-
- lea 16(a5),a5
- lea 64(a2),a2
- add.w d6,d6 ; next DMA channel
- dbf d7,Br_PlayNewNote
-
- move.w Br_Speed(pc),Br_Counter-Br_Infos(a0)
-
- bra.b Br_PlayCheckCounter
-
- Br_PlayOldNote:
- move.w Br_ChEff(a2),d1
- beq.b .Br_PlayOldDontCheck
- move.b Br_ChEff(a2),d0
- ext.w d0
- move.w .Br_EffectTable2(pc,d0.w),d0
- jsr (a6,d0.w) ; A6 = Br_EffectNo
- bra.b .Br_PlayOldDontCheck
-
- .Br_EffectTable2: ; Effets à chaque frame
- dc.w Br_Arpeggio-Br_EffectNo ; 0 Arpeggio
- dc.w Br_TuneUp-Br_EffectNo ; 1 Tune Up
- dc.w Br_TuneDown-Br_EffectNo ; 2 Tune Down
- dc.w Br_Portamento-Br_EffectNo ; 3 Portamento
- dc.w Br_Vibrato-Br_EffectNo ; 4 Vibrato
- dc.w Br_PortVolSlide-Br_EffectNo ; 5 Portamento + Volume Slide
- dc.w Br_VibrVolSlide-Br_EffectNo ; 6 Vibrato + Volume Slide
- dc.w Br_EffectDisconnect-Br_EffectNo ; 7 Tremolo
- dc.w Br_EffectDisconnect-Br_EffectNo ; 8
- dc.w Br_EffectDisconnect-Br_EffectNo ; 9 Sample Offset
- dc.w Br_VolumeSlide-Br_EffectNo ; A Volume Slide
- dc.w Br_EffectDisconnect-Br_EffectNo ; B Break Song
- dc.w Br_EffectDisconnect-Br_EffectNo ; C Set Volume
- dc.w Br_EffectDisconnect-Br_EffectNo ; D Break Pattern
- dc.w Br_ECommands2-Br_EffectNo ; E Others
- dc.w Br_EffectDisconnect-Br_EffectNo ; F Set Speed
-
- .Br_PlayOldDontCheck:
- IFNE Br_MasterVolumeControl
- move.w Br_ChVol(a2),d0
- mulu.w Br_MasterVolume-Br_Infos(a0),d0
- lsr.w #6,d0
- move.w d0,8(a5)
- ENDC
-
- lea 64(a2),a2
- lea 16(a5),a5
- add.w d6,d6
- dbf d7,Br_PlayOldNote
-
- Br_PlayCheckCounter:
- IFNE Br_MasterVolumeControl
- move.w Br_MasterVolume(pc),d0
- add.w Br_FadeVolume(pc),d0
- bge.b .Br_PlayCheckFadeDown
- clr.w d0
- bra.b .Br_PlayCheckFadeUp
- .Br_PlayCheckFadeDown:
- cmp.w #64,d0
- ble.b .Br_PlayCheckFadeUp
- moveq #64,d0
- .Br_PlayCheckFadeUp:
- move.w d0,Br_MasterVolume-Br_Infos(a0)
- ENDC
-
- subq.w #1,Br_Counter-Br_Infos(a0)
- bne.w .Br_PlayEnd
-
- tst.w Br_PtrnDelay-Br_Infos(a0)
- beq.b .Br_PlayPatternNotDelayed
- subq.w #1,Br_PtrnDelay-Br_Infos(a0)
- beq.b .Br_PlayPatternNotDelayed
- bra.w .Br_PlayEnd
-
- .Br_PlayPatternNotDelayed:
- tst.l Br_Break-Br_Infos(a0)
- bne.b .Br_PlayCheckBreak
-
- add.l #16,Br_Pattern-Br_Infos(a0)
- addq.w #1,Br_Note-Br_Infos(a0)
- cmp.w #64,Br_Note-Br_Infos(a0)
- bne.w .Br_PlayEnd
- clr.w Br_Note-Br_Infos(a0)
- move.w Br_Position(pc),d0
- addq.w #1,d0
- cmp.b Br_MaxPos(pc),d0
- blt.b .Br_PlayNotBottomOfSong
- moveq #0,d0
- .Br_PlayNotBottomOfSong:
- move.w d0,Br_Position-Br_Infos(a0)
- bra.b .Br_PlayCalcNewAddress
-
- .Br_PlayCheckBreak:
- move.w #0,Br_Note-Br_Infos(a0)
- tst.w Br_Break-Br_Infos(a0)
- beq.b .Br_PlayBreakSong
- move.w Br_Break(pc),d1
- clr.w Br_Break-Br_Infos(a0)
- not.w d1 ; D1=New Note
- cmp.w #63,d1
- ble.b .Br_PlayTopOfPattern
- moveq #63,d1
- .Br_PlayTopOfPattern:
- move.w d1,Br_Note-Br_Infos(a0)
- tst.w Br_BreakSng-Br_Infos(a0)
- bne.b .Br_PlayBreakSong
- move.w Br_Position(pc),d0 ; la song n'a pas été coupée, alors
- addq.w #1,d0 ; on avance de 1 position
- cmp.b Br_MaxPos(pc),d0
- blt.b .Br_PlayBreakBottom
- moveq #0,d0
- .Br_PlayBreakBottom:
- move.w d0,Br_Position-Br_Infos(a0)
- bra.b .Br_PlayCalcNewAddress
-
- .Br_PlayBreakSong:
- move.w Br_BreakSng(pc),d0
- clr.w Br_BreakSng-Br_Infos(a0)
- not.w d0 ; D0=New Pos
- cmp.b Br_MaxPos(pc),d0
- blt.b .Br_PlayBreakSongBottom
- moveq #0,d0
- .Br_PlayBreakSongBottom:
- move.w d0,Br_Position-Br_Infos(a0)
- .Br_PlayCalcNewAddress:
- move.l Br_Module(pc),a1
- lea 952(a1),a1
- move.b (a1,d0.w),d0
- ext.w d0
- ext.l d0
- lsl.l #8,d0
- lsl.l #2,d0
- add.l Br_Song(pc),d0
- move.w Br_Note(pc),d1
- ext.l d1
- lsl.w #4,d1
- move.l d0,Br_LoopStartAdr-Br_Infos(a0)
- add.l d1,d0
- move.l d0,Br_Pattern-Br_Infos(a0)
- clr.w Br_LoopStartPos-Br_Infos(a0)
- .Br_PlayEnd:
- lea $bfd400,a0
- move.b #$01,$500-$400(a0)
- move.b #$80,(a0)
- move.l Br_VBR(pc),a2
- lea Br_Int1(pc),a3
- move.l a3,$78(a2)
- move.b #$19,$e00-$400(a0)
- Br_DontPlay:
- movem.l (sp)+,d0-a6
- move.w #$2000,$dff09c
- rte
-
- ****************************************************************************
- ******************************************* Br Interrupts ******************
- Br_Int1:tst.w $bfdd00
- move.l a0,-(sp)
- move.l Br_VBR(pc),a0
- add.l #Br_Int2-Br_Int1,$78(a0)
- lea $dff096,a0
- move.w Br_DMACON(pc),(a0)
- move.b #$19,$bfde00
- move.w #$2000,$9c-$96(a0)
- move.l (sp)+,a0
- rte
-
- Br_Int2:movem.l d0/a2/a6,-(sp)
- lea $dff0a0,a6
- lea Br_ChannelInfo+Br_ChRP(pc),a2
- move.l (a2),(a6)
- move.w Br_ChRLen-Br_ChRP(a2),$4(a6)
- move.l 64(a2),$10(a6)
- move.w Br_ChRLen-Br_ChRP+64(a2),$14(a6)
- move.l 128(a2),$20(a6)
- move.w Br_ChRLen-Br_ChRP+128(a2),$24(a6)
- move.l 192(a2),$30(a6)
- move.w Br_ChRLen-Br_ChRP+192(a2),$34(a6)
- move.l Br_VBR(pc),a2
- add.l #Br_Play-Br_Int2,$78(a2)
- move.w Br_CIATimer(pc),d0 ; CIA init
- lea $bfd000,a2
- tst.w $d00(a2)
- move.b d0,$400(a2)
- rol.w #8,d0
- move.b d0,$500(a2)
- move.b #$19,$e00(a2)
- move.w #$2000,$09c-$0a0(a6)
- movem.l (sp)+,d0/a2/a6
- rte
-
- ****************************************************************************
- ****************************************** Br Effects **********************
- Br_ECommands1: ; E Check *
- move.w d1,d0
- and.w #$f,d1
- lsr.b #4,d0
- ext.w d0
- add.w d0,d0
- move.w Br_E_EffectTable1(pc,d0.w),d0
- jmp (a6,d0.w) ; A6 = Br_EffectNo
- Br_E_EffectTable1:
- dc.w Br_SetFilter-Br_EffectNo ; 0-Filter
- dc.w Br_FineTuneUp-Br_EffectNo ; 1-FineTune Up
- dc.w Br_FineTuneDown-Br_EffectNo ; 2-FineTune Down
- dc.w Br_EffectDisconnect-Br_EffectNo ; 3
- dc.w Br_EffectDisconnect-Br_EffectNo ; 4
- dc.w Br_EffectDisconnect-Br_EffectNo ; 5
- dc.w Br_LoopPattern-Br_EffectNo ; 6 Loop
- dc.w Br_EffectDisconnect-Br_EffectNo ; 7
- dc.w Br_CheckEvent-Br_EffectNo ; 8
- dc.w Br_PrepRetrigNote-Br_EffectNo ; 9-Retrig Note
- dc.w Br_FineVolumeUp-Br_EffectNo ; A-FineVolume Up
- dc.w Br_FineVolumeDown-Br_EffectNo ; B-FineVolume Down
- dc.w Br_EffectNo-Br_EffectNo ; C-NoteCut
- dc.w Br_PrepDelayNote-Br_EffectNo ; D-NoteDelay
- dc.w Br_PatternDelay-Br_EffectNo ; E PatternDelay
- dc.w Br_EffectDisconnect-Br_EffectNo ; F
-
- Br_ECommands2: ; E Check *
- move.w d1,d0
- and.w #$f,d1
- lsr.b #4,d0
- ext.w d0
- add.w d0,d0
- move.w Br_E_EffectTable2(pc,d0.w),d0
- jmp (a6,d0.w) ; A6 = Br_EffectNo
- Br_E_EffectTable2:
- dc.w Br_EffectDisconnect-Br_EffectNo ; 0 Filter
- dc.w Br_EffectDisconnect-Br_EffectNo ; 1 FineTune Up
- dc.w Br_EffectDisconnect-Br_EffectNo ; 2 FineTune Down
- dc.w Br_EffectDisconnect-Br_EffectNo ; 3
- dc.w Br_EffectDisconnect-Br_EffectNo ; 4
- dc.w Br_EffectDisconnect-Br_EffectNo ; 5
- dc.w Br_EffectDisconnect-Br_EffectNo ; 6 Loop
- dc.w Br_EffectDisconnect-Br_EffectNo ; 7
- dc.w Br_EffectDisconnect-Br_EffectNo ; 8
- dc.w Br_RetrigNote-Br_EffectNo ; 9 Retrig Note
- dc.w Br_EffectDisconnect-Br_EffectNo ; A FineVolume Up
- dc.w Br_EffectDisconnect-Br_EffectNo ; B FineVolume Down
- dc.w Br_NoteCut-Br_EffectNo ; C NoteCut
- dc.w Br_DelayNote-Br_EffectNo ; D NoteDelay
- dc.w Br_EffectDisconnect-Br_EffectNo ; E PatternDelay
- dc.w Br_EffectDisconnect-Br_EffectNo ; F
-
- Br_EffectNo:
- rts
-
- Br_EffectDisconnect:
- clr.w Br_ChEff(a2)
- rts
-
- Br_PrepArpeggio: ; 0
- move.b d1,d0
- and.w #$f,d1
- add.w d1,d1
- add.w Br_ChNote(a2),d1
- lsr.b #4,d0
- ext.w d0
- add.w d0,d0
- add.w Br_ChNote(a2),d0
- move.w Br_ChOldSample(a2),d2
- move.l Br_SplFineTablePtr(a3,d2.w),a4
- move.w (a4,d0.w),Br_ChArp1(a2)
- move.w (a4,d1.w),Br_ChArp2(a2)
- move.w (a2),Br_ChArp3(a2) ; Br_ChPer
- rts
-
- Br_Arpeggio: ; 0
- move.w Br_ChArp1(a2),d0
- move.w d0,6(a5)
- move.l Br_ChArp2(a2),Br_ChArp1(a2)
- move.w d0,Br_ChArp3(a2)
- rts
-
- Br_TuneUp: ; 1
- and.w #$ff,d1
- move.w (a2),d0 ; Br_ChPer
- sub.w d1,d0
- cmp.w #107,d0
- bgt.b .Br_TuneUp_0
- move.w #108,d0
- clr.w Br_ChEff(a2)
- .Br_TuneUp_0:
- move.w d0,(a2) ; Br_ChPer
- move.w d0,6(a5)
- rts
-
- Br_TuneDown: ; 2
- and.w #$ff,d1
- move.w (a2),d0 ; Br_ChPer
- add.w d1,d0
- cmp.w #908,d0
- blt.b .Br_TuneDown_0
- move.w #907,d0
- clr.w Br_ChEff(a2)
- .Br_TuneDown_0:
- move.w d0,(a2) ; Br_ChPer
- move.w d0,6(a5)
- rts
-
- Br_PrepPortamento: ; 3
- tst.b d1
- beq.b .Br_PrepPortamento_0
- move.b d1,Br_ChPortamento+1(a2)
- .Br_PrepPortamento_0:
- tst.w d5 ; Si on joue une nouvelle
- beq.b .Br_PrepPortamento_1 ; note, il faut swapper les
- move.w (a2),Br_ChPortDest(a2) ; périodes, car la nouvelle
- move.w Br_ChPortSource(a2),(a2) ; note est la DESTINATION
- moveq #0,d5 ; Et pas de nouveau sample...
- .Br_PrepPortamento_1:
- rts
-
- Br_Portamento: ; 3
- move.w Br_ChPortDest(a2),d1
- beq.b .Br_NoPortamento
- move.w (a2),d2 ; Br_ChPer
- cmp.w d1,d2
- beq.b .Br_NoPortamento
- blt.b .Br_Portamento_1 ; Si Periode<Destina0, Sub Portam,Per
- .Br_Portamento_0:
- sub.w Br_ChPortamento(a2),d2
- cmp.w d1,d2
- bgt.b .Br_EndPortamento
- move.w d1,d2
- clr.w Br_ChEff(a2)
- bra.b .Br_EndPortamento
- .Br_Portamento_1:
- add.w Br_ChPortamento(a2),d2
- cmp.w d1,d2
- blt.b .Br_EndPortamento
- move.w d1,d2
- clr.w Br_ChEff(a2)
- .Br_EndPortamento:
- move.w d2,(a2) ; Br_ChPer
- move.w d2,6(a5)
- .Br_NoPortamento:
- rts
-
- Br_PrepVibrato: ; 4
- move.w d1,d0
- and.b #$f,d1 ; D1 = VibratoDepth
- beq.b .Br_PrepVibrato_0
- move.b d1,Br_ChVibratoDepth+1(a2)
- .Br_PrepVibrato_0:
- lsr.b #4,d0 ; D0 = VibratoSpeed
- ext.w d0
- add.w d0,d0
- beq.b .Br_PrepVibrato_1
- move.w d0,Br_ChVibratoSpeed(a2)
- .Br_PrepVibrato_1:
- rts
-
- Br_Vibrato: ; 4
- move.w Br_ChVibratoPos(a2),d0
- lea Br_VibratoTable(pc),a4
- move.w (a4,d0.w),d1
- muls.w Br_ChVibratoDepth(a2),d1
- lsr.l #7,d1
- add.w (a2),d1
- move.w d1,6(a5)
- add.w Br_ChVibratoSpeed(a2),d0
- and.w #126,d0
- move.w d0,Br_ChVibratoPos(a2)
- rts
-
- Br_PrepPortVolSlide: ; 5
- clr.w d1
- bra.w Br_PrepPortamento
-
- Br_PortVolSlide: ; 5
- move.b d1,d0
- beq.b .Br_NoVolumeSlide
- and.w #$f,d0
- move.w Br_ChVol(a2),d2
- lsr.b #4,d1
- ext.w d1
- bne.b .Br_VolumeSlideUp
- sub.w d0,d2
- bge.b .Br_VolumeSlideEnd
- clr.w Br_ChVol(a2)
- IFEQ Br_MasterVolumeControl
- move.w #0,8(a5)
- ENDC
- bra.b .Br_NoVolumeSlide
- .Br_VolumeSlideUp:
- add.w d1,d2
- cmp.w #64,d2
- ble.b .Br_VolumeSlideEnd
- moveq #64,d0
- move.w d0,Br_ChVol(a2)
- IFEQ Br_MasterVolumeControl
- move.w d0,8(a5)
- ENDC
- bra.b .Br_NoVolumeSlide
- .Br_VolumeSlideEnd:
- move.w d2,Br_ChVol(a2)
- IFEQ Br_MasterVolumeControl
- move.w d2,8(a5)
- ENDC
- .Br_NoVolumeSlide:
- move.w Br_ChPortDest(a2),d1
- beq.b .Br_NoPortamento
- move.w (a2),d2 ; Br_ChPer
- cmp.w d1,d2
- beq.b .Br_NoPortamento
- blt.b .Br_Portamento_1 ; Si Periode<Destina0, Sub Portam,Per
- .Br_Portamento_0:
- sub.w Br_ChPortamento(a2),d2
- cmp.w d1,d2
- bgt.b .Br_EndPortamento
- move.w d1,d2
- bra.b .Br_EndPortamento
- .Br_Portamento_1:
- add.w Br_ChPortamento(a2),d2
- cmp.w d1,d2
- blt.b .Br_EndPortamento
- move.w d1,d2
- .Br_EndPortamento:
- move.w d2,(a2) ; Br_ChPer
- move.w d2,6(a5)
- .Br_NoPortamento:
- rts
-
- Br_PrepVibrVolSlide: ; 6
- clr.w d1
- bra.w Br_PrepVibrato
-
- Br_VibrVolSlide: ; 6
- move.b d1,d0
- beq.b .Br_NoVolumeSlide
- and.w #$f,d0
- move.w Br_ChVol(a2),d2
- lsr.b #4,d1
- ext.w d1
- bne.b .Br_VolumeSlideUp
- sub.w d0,d2
- bge.b .Br_VolumeSlideEnd
- clr.w Br_ChVol(a2)
- IFEQ Br_MasterVolumeControl
- move.w #0,8(a5)
- ENDC
- bra.b .Br_NoVolumeSlide
- .Br_VolumeSlideUp:
- add.w d1,d2
- cmp.w #64,d2
- ble.b .Br_VolumeSlideEnd
- moveq #64,d0
- move.w d0,Br_ChVol(a2)
- IFEQ Br_MasterVolumeControl
- move.w d0,8(a5)
- ENDC
- bra.b .Br_NoVolumeSlide
- .Br_VolumeSlideEnd:
- move.w d2,Br_ChVol(a2)
- IFEQ Br_MasterVolumeControl
- move.w d2,8(a5)
- ENDC
- .Br_NoVolumeSlide:
- bra.w Br_Vibrato
-
- Br_SampleOffset: ; 9
- and.w #$ff,d1
- beq.b .Br_SampleOffset_0
- lsl.w #7,d1
- move.w d1,Br_ChSampleOffset(a2)
- bra.b .Br_SampleOffset_01
- .Br_SampleOffset_0:
- move.w Br_ChSampleOffset(a2),d1
- .Br_SampleOffset_01:
- ext.l d1
- moveq #0,d0
- move.l Br_ChAdr(a2),d2
- move.l d2,d4
- move.w Br_ChLen(a2),d0
- add.w d0,d0
- add.l d0,d2 ; D2 = Sample MaxAddress
- sub.w d1,Br_ChLen(a2) ; New SampleLength
- add.w d1,d1
- add.l d1,d4
- move.l d4,Br_ChAdr(a2) ; D0 = Sample New StartAddress
- cmp.l d4,d2
- bgt.b .Br_SampleOffset_1
- move.l Br_ChRP(a2),Br_ChAdr(a2)
- move.w Br_ChRLen(a2),Br_ChLen(a2)
- .Br_SampleOffset_1:
- clr.w Br_ChEff(a2)
- rts
-
- Br_VolumeSlide: ; A
- move.b d1,d0
- beq.b .Br_NoVolumeSlide
- and.w #$f,d0
- move.w Br_ChVol(a2),d2
- lsr.b #4,d1
- ext.w d1
- bne.b .Br_VolumeSlideUp
- sub.w d0,d2
- bge.b .Br_VolumeSlideEnd
- clr.w Br_ChVol(a2)
- IFEQ Br_MasterVolumeControl
- move.w #0,8(a5)
- ENDC
- clr.w Br_ChEff(a2)
- rts
- .Br_VolumeSlideUp:
- add.w d1,d2
- cmp.w #64,d2
- ble.b .Br_VolumeSlideEnd
- moveq #64,d0
- move.w d0,Br_ChVol(a2)
- IFEQ Br_MasterVolumeControl
- move.w d0,8(a5)
- ENDC
- clr.w Br_ChEff(a2)
- rts
- .Br_VolumeSlideEnd:
- move.w d2,Br_ChVol(a2)
- IFEQ Br_MasterVolumeControl
- move.w d2,8(a5)
- ENDC
- .Br_NoVolumeSlide:
- rts
-
- Br_BreakSong: ; B
- and.w #$ff,d1
- not.w d1
- move.w d1,Br_BreakSng-Br_Infos(a0)
- clr.w Br_ChEff(a2)
- rts
-
- Br_SetVolume: ; C
- move.b d1,Br_ChVol+1(a2)
- clr.w Br_ChEff(a2)
- rts
-
- Br_BreakPattern: ; D
- move.w d1,d0
- lsr.b #4,d0
- ext.w d0
- and.w #$f,d1
- mulu.w #10,d0
- add.w d1,d0
- not.w d0
- move.w d0,Br_Break-Br_Infos(a0)
- clr.w Br_ChEff(a2)
- rts
-
- Br_SetSpeed: ; F
- tst.b d1
- bne.b .Br_SetSpeed_0
- clr.w (a0)
- rts
- .Br_SetSpeed_0:
- cmp.b #31,d1
- bhi.b .Br_SetCIATiming
- move.b d1,Br_Speed+1-Br_Infos(a0)
- clr.w Br_ChEff(a2)
- rts
- .Br_SetCIATiming:
- move.l #Br_FrameValue,d0
- and.w #$ff,d1
- divu.w d1,d0
- sub.w #Br_ReplayTime,d0
- move.w d1,Br_Tempo-Br_Infos(a0)
- move.w d0,Br_CIATimer-Br_Infos(a0)
- clr.w Br_ChEff(a2)
- rts
-
- Br_SetFilter ; E0
- tst.b d1
- beq.b .Br_FilterOn
- .Br_FilterOff:
- bset #1,$bfe001
- clr.w Br_ChEff(a2)
- rts
- .Br_FilterOn:
- bclr #1,$bfe001
- clr.w Br_ChEff(a2)
- rts
-
- Br_FineTuneUp: ; E1
- move.w (a2),d0 ; Br_ChPer
- sub.w d1,d0
- cmp.w #107,d0
- bgt.b .Br_FineTuneUp_0
- move.w #108,d0
- .Br_FineTuneUp_0:
- move.w d0,(a2) ; Br_ChPer
- clr.w Br_ChEff(a2)
- rts
-
- Br_FineTuneDown: ; E2
- move.w (a2),d0 ; Br_ChPer
- add.w d1,d0
- cmp.w #908,d0
- blt.b .Br_FineTuneDown_0
- move.w #907,d0
- .Br_FineTuneDown_0:
- move.w d0,(a2) ; Br_ChPer
- clr.w Br_ChEff(a2)
- rts
-
- Br_LoopPattern: ; E6 *
- clr.w Br_ChEff(a2)
- tst.w Br_LoopTest-Br_Infos(a0)
- bne.b .Br_EndLoop
- not.w Br_LoopTest-Br_Infos(a0)
- tst.b d1
- beq.b .Br_PrepLoop
- tst.w Br_LoopPatternVal-Br_Infos(a0) ; Y-a-t'il une boucle en cours?
- beq.b .Br_InitLoop
- subq.w #1,Br_LoopPatternVal-Br_Infos(a0)
- beq.b .Br_EndLoop
- move.l Br_LoopStartAdr(pc),Br_Pattern-Br_Infos(a0)
- move.w Br_LoopStartPos(pc),Br_Note-Br_Infos(a0)
- .Br_EndLoop:
- rts
- .Br_InitLoop:
- move.w d1,Br_LoopPatternVal-Br_Infos(a0)
- move.l Br_LoopStartAdr(pc),Br_Pattern-Br_Infos(a0)
- move.w Br_LoopStartPos(pc),Br_Note-Br_Infos(a0)
- rts
-
- .Br_PrepLoop:
- move.l Br_Pattern(pc),Br_LoopStartAdr-Br_Infos(a0)
- sub.l #16,Br_LoopStartAdr-Br_Infos(a0)
- move.w Br_Note(pc),Br_LoopStartPos-Br_Infos(a0)
- subq.w #1,Br_LoopStartPos-Br_Infos(a0)
- .Br_PrepNoLoop:
- rts
-
- Br_CheckEvent: ; E8
- lea Br_EventTable(pc),a4 ; Fonction usable for synchro
- add.w d1,d1 ; demo parts... Just check the
- move.w #-1,(a4,d1.w) ; good event in your own code, and
- clr.w Br_ChEff(a2) ; jump if ok... You should put E8x in
- rts ; your module where you wanna break...
-
- Br_PrepRetrigNote: ; E9
- or.b #$90,d1
- move.b d1,Br_ChTempValue(a2)
- rts
-
- Br_RetrigNote: ; E9 *
- subq.b #1,d1
- bne.b .Br_RetrigNote_0
- move.w d6,$dff096 ; DMACON
- or.w d6,Br_DMACON-Br_Infos(a0)
- move.l Br_ChAdr(a2),(a5)
- move.w Br_ChLen(a2),4(a5)
- move.b Br_ChTempValue(a2),Br_ChCommand(a2)
- rts
- .Br_RetrigNote_0:
- subq.b #1,Br_ChCommand(a2)
- rts
-
- Br_FineVolumeUp: ; EA
- move.w Br_ChVol(a2),d2
- add.w d1,d2
- cmp.w #64,d2
- ble.b .Br_FineVolumeUp_0
- moveq #64,d2
- .Br_FineVolumeUp_0:
- move.w d2,Br_ChVol(a2)
- IFEQ Br_MasterVolumeControl
- move.w d2,8(a5)
- ENDC
- clr.w Br_ChEff(a2)
- rts
-
- Br_FineVolumeDown: ; EB
- move.w Br_ChVol(a2),d2
- sub.w d1,d2
- bge.b .Br_FineVolumeDown_0
- moveq #0,d2
- .Br_FineVolumeDown_0:
- move.w d2,Br_ChVol(a2)
- IFEQ Br_MasterVolumeControl
- move.w d2,8(a5)
- ENDC
- clr.w Br_ChEff(a2)
- rts
-
- Br_NoteCut: ; EC
- subq.w #1,d1
- bne.b .Br_NoteCut_0
- clr.w Br_ChVol(a2)
- IFEQ Br_MasterVolumeControl
- move.w #0,8(a5)
- ENDC
- clr.w Br_ChEff(a2)
- rts
- .Br_NoteCut_0:
- subq.b #1,Br_ChCommand(a2)
- rts
-
- Br_PrepDelayNote: ; ED *
- moveq #1,d5
- tst.b d1
- beq.b Br_DoDelay
- rts
-
- Br_DelayNote:
- subq.b #1,d1
- bne.b Br_DelayNote_0
- Br_DoDelay:
- move.w d6,$dff096 ; DMACON
- or.w d6,Br_DMACON-Br_Infos(a0)
- move.w (a2),6(a5)
- move.l Br_ChAdr(a2),(a5)
- move.w Br_ChLen(a2),4(a5)
- IFEQ Br_MasterVolumeControl
- move.w Br_ChVol(a2),8(a5)
- ENDC
- clr.w Br_ChEff(a2)
- rts
- Br_DelayNote_0:
- subq.b #1,Br_ChCommand(a2)
- rts
-
- Br_PatternDelay: ; EE
- tst.w Br_PtrnDelay-Br_Infos(a0)
- bne.b .Br_PatternDelayIsAlreadyActive
- addq.w #1,d1
- move.w d1,Br_PtrnDelay-Br_Infos(a0)
- .Br_PatternDelayIsAlreadyActive:
- clr.w Br_ChEff(a2)
- rts
-
- ******************************************************************************
- Br_Init:**********************************************************************
- movem.l d1-a6,-(sp)
- moveq #0,d0
- lea Br_Infos(pc),a1
- move.l a0,Br_Module-Br_Infos(a1)
- clr.w (a1)
- cmp.l #'M.K.',1080(a0) ; Si module 31 samples, Ok, joue
- beq.w .Br_InitOk
- cmp.l #'Fuck',1080(a0) ; Si pas module déjà converti...
- bne.w .Br_InitEnd ; mange ton bras.
- .Br_InitOk:
- subq.w #1,(a1)
-
- bset #1,$bfe001
-
- move.w $dff002,d0
- or.w #$8000,d0
- move.w d0,Br_OldDMACON-Br_Infos(a1)
-
- move.w #$000f,$dff096
-
- move.b 950(a0),Br_MaxPos-Br_Infos(a1)
-
- moveq #0,d0
- moveq #127,d7
- lea 952(a0),a2
- .Br_InitFindMaxPat: ; trouver la pattern maximale
- cmp.b (a2)+,d0
- bge.b .Br_InitNotMaxPat
- move.b -1(a2),d0
- .Br_InitNotMaxPat:
- dbf d7,.Br_InitFindMaxPat
-
- move.b d0,Br_MaxPat-Br_Infos(a1)
-
- addq.l #4,a2 ; A2 = SongData pointer
-
- move.l a2,Br_Song-Br_Infos(a1)
-
- moveq #0,d1 ; Yes, go somewhere else...
- move.b d0,d1
- addq.w #1,d1
- lsl.l #8,d1
- lsl.l #2,d1
- move.l a2,a4
- add.l d1,a4
-
- cmp.l #'Fuck',1080(a0) ; Module has already been converted?
- beq.b .Br_InitPatEnd ; No, convert
-
- .Br_InitCheckPat:
-
- move.w (a2),d1
- move.w d1,d2
- lsr.w #8,d2 ; D2 = Sample
- and.b #$f0,d2
-
- move.w 2(a2),d3
- move.w d3,d4 ; D4 = Effet + Commande
- and.w #$0fff,d4
- eor.w d4,d3
- rol.w #4,d3
- or.b d3,d2
-
- move.w #$ff00,d5
- and.w d4,d5
- add.w d5,d5
- cmp.w #($c*2)<<8,d5
- bne.b .Br_InitNotSetVolume
- cmp.b #64,d4
- bls.b .Br_InitNotSetVolume
- moveq #64,d4
- .Br_InitNotSetVolume:
- move.b d4,d5
-
- .Br_InitTestNote:
- and.w #$0fff,d1 ; D1 = Note
- beq.b .Br_InitPutToSong
-
- lea Br_Period0-Br_Infos(a1),a3
- moveq #0,d3
- .Br_InitFindGoodNote:
- addq.w #1,d3
- cmp.w #37,d3
- bge.b .Br_InitNoteFoundOrNot
- cmp.w (a3)+,d1
- bne.b .Br_InitFindGoodNote
- .Br_InitNoteFoundOrNot:
- add.b d3,d3
- move.b d3,d1
-
- .Br_InitPutToSong:
- move.b d2,(a2)+
- move.b d1,(a2)+
- move.w d5,(a2)+
- cmp.l a2,a4
- bne.b .Br_InitCheckPat
- .Br_InitPatEnd:
-
- move.l a4,a2
- move.l a2,Br_Sample-Br_Infos(a1)
-
- move.l #'Fuck',1080(a0) ; the Army
-
- move.w #0,$dff0a8
- move.w #0,$dff0b8
- move.w #0,$dff0c8
- move.w #0,$dff0d8
-
- move.w #$000f,$dff096
-
- moveq #30,d7
- lea 42(a0),a3
- lea Br_SampleInfos(pc),a4
-
- .Br_InitSampleInit:
- move.l a2,Br_SplAdr(a4) ; Sample Start Address
- moveq #0,d0
- move.b 2(a3),d0
- move.b d0,(a4) ; Finetune
- move.b 3(a3),Br_SplVol(a4) ; Volume
-
- lea Br_Period0(pc),a5
- mulu.w #36*2,d0
- lea (a5,d0.w),a5
- move.l a5,Br_SplFineTablePtr(a4)
-
- moveq #0,d0
- move.w 4(a3),d0
- add.l d0,d0
- add.l a2,d0
- move.l d0,Br_SplRP(a4) ; RepeatPoint address
-
- moveq #0,d1
- move.w 6(a3),d1
- move.w d1,Br_SplRLen(a4) ; RepeatLen
-
- tst.w (a3)
- beq.b .Br_InitSampleInit_0
-
- cmp.l d0,a2
- beq.b .Br_InitSampleInit_1
-
- .Br_InitSampleInit_0:
- add.l d1,d1
- add.l d1,d0 ; EndLoop Address
- sub.l a2,d0
- lsr.l #1,d0
- move.w d0,Br_SplLen(a4) ; FirstPass Len
- bra.b .Br_InitSampleInit_2
-
- .Br_InitSampleInit_1:
- move.w (a3),Br_SplLen(a4) ; FirstPass Len
-
- .Br_InitSampleInit_2:
- moveq #0,d0
- move.w (a3),d0 ; Look for next Sample address
- add.l d0,d0
- add.l d0,a2
-
- lea 32(a4),a4
- lea 30(a3),a3
- dbf d7,.Br_InitSampleInit
-
- move.w #Br_TempoInit,Br_Tempo-Br_Infos(a1)
- move.w #(Br_FrameValue/Br_TempoInit)-Br_ReplayTime,Br_CIATimer-Br_Infos(a1)
- move.w #6,Br_Speed-Br_Infos(a1)
-
- move.w Br_StartPos(pc),Br_Position-Br_Infos(a1)
- move.w Br_StartNote(pc),Br_Note-Br_Infos(a1)
- clr.w Br_Counter-Br_Infos(a1)
- clr.l Br_Break-Br_Infos(a1)
- clr.l Br_PtrnDelay-Br_Infos(a1)
-
- move.w Br_Position(pc),d0 ; Init pattern pointer
- add.w #952,d0
- move.b (a0,d0.w),d0
- ext.w d0
- ext.l d0
- lsl.l #8,d0
- lsl.l #2,d0
- add.l Br_Song(pc),d0
- move.w Br_Note(pc),d1
- ext.l d1
- lsl.w #4,d1
- add.l d1,d0
- move.l d0,Br_Pattern-Br_Infos(a1)
- move.l d0,Br_LoopStartAdr-Br_Infos(a1)
- clr.w Br_LoopStartPos-Br_Infos(a1)
-
- move.l Br_VBR(pc),a4
- move.l $78(a4),Br_Old78-Br_Infos(a1)
-
- lea Br_EventTable(pc),a4
- REPT 4
- clr.l (a4)+
- ENDR
-
- lea Br_ChannelInfo+64*4(pc),a0
- moveq #0,d0
- moveq #0,d1
- moveq #0,d2
- moveq #0,d3
- moveq #0,d4
- moveq #0,d5
- moveq #0,d6
- moveq #0,d7
-
- REPT 8
- movem.l d0-d7,-(a0)
- ENDR
-
- moveq #-1,d0
- .Br_InitEnd:
- movem.l (sp)+,d1-a6
- rts
-
- *****************************************************************************
- Br_End:**********************************************************************
- move.l a0,-(sp)
- lea Br_Infos,a0
- moveq #0,d0
- move.w d0,(a0)
- move.w Br_OldDMACON(pc),$dff096
- move.l Br_VBR(pc),a0
- move.l Br_Old78(pc),$78(a0)
- move.w d0,$dff0a8
- move.w d0,$dff0b8
- move.w d0,$dff0c8
- move.w d0,$dff0d8
- move.l (sp)+,a0
- rts
-
- *****************************************************************************
- Br_GetVBR:****************************** Get VBR procedure by XANN *********
- MOVEM.L D0/A0/A5-A6,-(SP) ; Only usable under DOS...
- LEA Br_VBR(PC),A0
- MOVE.L 4.W,A6
- BTST #0,296+1(A6) ; AttnFlags.W >= 'Mc68010' ?
- BEQ.B .Mc68000
- LEA .StoreVBR(PC),A5
- PEA .Mc680X0(PC) ; Return Address for SV()'s RTS
- JMP -30(A6) ; Supervisor
-
- .StoreVBR:
- Dc.L $4E7A0801 ; MOVEC VBR,D0
- RTE
-
- .Mc680X0:
- MOVE.L D0,(A0) ; Store VBR in [VectorBase].L
- .Mc68000:
- MOVEM.L (SP)+,D0/A0/A5-A6
- RTS
-
- *****************************************************************************
- ****************************************** Br Control Variables *************
-
- Br_Infos: dc.w 0 ; Status
- Br_MaxPos: dc.b 0
- Br_MaxPat: dc.b 0
- Br_Module: dc.l 0
- Br_Song: dc.l 0 ; Song address
- Br_Sample: dc.l 0 ; Samples start address
- Br_Pattern: dc.l 0 ; Pointeur sur la pattern
- Br_Counter: dc.w 0 ; Compteur de frame
- Br_Position: dc.w 0 ; Position dans la SONG
- Br_Note: dc.w 0 ; Position dans la PATTERN
- Br_Break: dc.w 0
- Br_BreakSng: dc.w 0
- Br_DMACON: dc.w 0
- Br_LoopTest: dc.w 0
- Br_OldDMACON: dc.w 0
- Br_Old78: dc.l 0
- Br_VBR: dc.l 0
- Br_PtrnDelay: dc.w 0
- Br_LoopPatternVal: dc.w 0
- Br_LoopStartPos: dc.w 0
- Br_LoopStartAdr: dc.l 0
-
- IFNE Br_MasterVolumeControl
- Br_MasterVolume: dc.w Br_Volume
- Br_FadeVolume: dc.w 0
- ENDC
- Br_Speed: dc.w 6
- Br_Tempo: dc.w Br_TempoInit
- Br_CIATimer: dc.w (Br_FrameValue/Br_TempoInit)-Br_ReplayTime
-
- Br_StartPos: dc.w 0
- Br_StartNote: dc.w 0
-
- ;Br_ChPer = 0 ; w Offset
- Br_ChVol = 2 ; w
- Br_ChAdr = 4 ; l
- Br_ChRP = 8 ; l
- Br_ChLen = 12 ; w
- Br_ChRLen = 14 ; w
- Br_ChEff = 16 ; b
- Br_ChCommand = 17 ; b
- Br_ChTempValue = 18 ; w
- Br_ChNote = 20 ; w
- Br_ChOldSample = 22 ; w
- Br_ChPortamento = 24 ; w
- Br_ChSampleOffset = 26 ; w
- Br_ChPortSource = 28 ; w
- Br_ChPortDest = 30 ; w
- Br_ChArp1 = 32 ; w
- Br_ChArp2 = 34 ; w
- Br_ChArp3 = 36 ; w
- Br_ChVibratoSpeed = 38 ; w
- Br_ChVibratoDepth = 40 ; w
- Br_ChVibratoPos = 42 ; w
- Br_ChannelInfo: ds.b 64*4 ; DS CLEAR option would be better...
-
- ;Br_SplFine = 0 ; b Offset
- Br_SplVol = 1 ; b
- Br_SplAdr = 2 ; l
- Br_SplRP = 6 ; l
- Br_SplLen = 10 ; w
- Br_SplRLen = 12 ; w
- Br_SplFineTablePtr = 14 ; l
- Br_SampleInfos: ds.b 32*31
-
- Br_Period0:
- dc.w 856,808,762,720,678,640,604,570,538,508,480,453
- dc.w 428,404,381,360,339,320,302,285,269,254,240,226
- dc.w 214,202,190,180,170,160,151,143,135,127,120,113
-
- dc.w 850,802,757,715,674,637,601,567,535,505,477,450
- dc.w 425,401,379,357,337,318,300,284,268,253,239,225
- dc.w 213,201,189,179,169,159,150,142,134,126,119,113
-
- dc.w 844,796,752,709,670,632,597,563,532,502,474,447
- dc.w 422,398,376,355,335,316,298,282,266,251,237,224
- dc.w 211,199,188,177,167,158,149,141,133,125,118,112
-
- dc.w 838,791,746,704,665,628,592,559,528,498,470,444
- dc.w 419,395,373,352,332,314,296,280,264,249,235,222
- dc.w 209,198,187,176,166,157,148,140,132,125,118,111
-
- dc.w 832,785,741,699,660,623,588,555,524,495,467,441
- dc.w 416,392,370,350,330,312,294,278,262,247,233,220
- dc.w 208,196,185,175,165,156,147,139,131,124,117,110
-
- dc.w 826,779,736,694,655,619,584,551,520,491,463,437
- dc.w 413,390,368,347,328,309,292,276,260,245,232,219
- dc.w 206,195,184,174,164,155,146,138,130,123,116,109
-
- dc.w 820,774,730,689,651,614,580,547,516,487,460,434
- dc.w 410,387,365,345,325,307,290,274,258,244,230,217
- dc.w 205,193,183,172,163,154,145,137,129,122,115,109
-
- dc.w 814,768,725,684,646,610,575,543,513,484,457,431
- dc.w 407,384,363,342,323,305,288,272,256,242,228,216
- dc.w 204,192,181,171,161,152,144,136,128,121,114,108
-
- dc.w 907,856,808,762,720,678,640,604,570,538,508,480
- dc.w 453,428,404,381,360,339,320,302,285,269,254,240
- dc.w 226,214,202,190,180,170,160,151,143,135,127,120
-
- dc.w 900,850,802,757,715,675,636,601,567,535,505,477
- dc.w 450,425,401,379,357,337,318,300,284,268,253,238
- dc.w 225,212,200,189,179,169,159,150,142,134,126,119
-
- dc.w 894,844,796,752,709,670,632,597,563,532,502,474
- dc.w 447,422,398,376,355,335,316,298,282,266,251,237
- dc.w 223,211,199,188,177,167,158,149,141,133,125,118
-
- dc.w 887,838,791,746,704,665,628,592,559,528,498,470
- dc.w 444,419,395,373,352,332,314,296,280,264,249,235
- dc.w 222,209,198,187,176,166,157,148,140,132,125,118
-
- dc.w 881,832,785,741,699,660,623,588,555,524,494,467
- dc.w 441,416,392,370,350,330,312,294,278,262,247,233
- dc.w 220,208,196,185,175,165,156,147,139,131,123,117
-
- dc.w 875,826,779,736,694,655,619,584,551,520,491,463
- dc.w 437,413,390,368,347,328,309,292,276,260,245,232
- dc.w 219,206,195,184,174,164,155,146,138,130,123,116
-
- dc.w 868,820,774,730,689,651,614,580,547,516,487,460
- dc.w 434,410,387,365,345,325,307,290,274,258,244,230
- dc.w 217,205,193,183,172,163,154,145,137,129,122,115
-
- dc.w 862,814,768,725,684,646,610,575,543,513,484,457
- dc.w 431,407,384,363,342,323,305,288,272,256,242,228
- dc.w 216,203,192,181,171,161,152,144,136,128,121,114
-
- Br_VibratoTable:
- dc.w 0,24,49,74,97,120,141,161
- dc.w 180,197,212,224,235,244,250,253
- dc.w 255,253,250,244,235,224,212,197
- dc.w 180,161,141,120,97,74,49,24
- dc.w 0,-24,-49,-74,-97,-120,-141,-161
- dc.w -180,-197,-212,-224,-235,-244,-250,-253
- dc.w -255,-253,-250,-244,-235,-224,-212,-197
- dc.w -180,-161,-141,-120,-97,-74,-49,-24
-
- Br_EventTable:
- ds.w 16
- Br_Length=*-Br_Start
-
- SECTION Module,DATA_C
- Mod: incdir modules:
- incbin mod.Your_Module
-